import React from 'react';
import { observer } from 'mobx-react';

@observer
class TodoView extends React.Component{

    filter = (e) => {
        this.props.store.filter = e.target.value;
    }

    render(){

        const filter = this.props.store.filter;

        return <div>
            <h1>todo</h1>
            <input className = "filter" value={filter} onChange={this.filter}/>
        </div>
    }
}
export default TodoView;